<template>
    <div class="businessCircles">
      <div class="header">
        <van-nav-bar title="工商注册" fixed left-text="返回" right-text left-arrow @click-left="onClickLeft"/>
      </div>
          <section>
            <div class="section_head">
              <img src="../../assets/images/greenFinance/1.png">
              <img src="../../assets/images/greenFinance/2.png">
              <img src="../../assets/images/greenFinance/3.png">
              <img src="../../assets/images/greenFinance/4.png">
              <img src="../../assets/images/greenFinance/5.png">
            </div>
          </section>
      <footer>
        <div class="foot">
          <div class="footer_left" @click="toRegistration()">
            <img src="../../assets/images/greenFinance/left.png">
          </div>
          <div class="footer_right" @click="toApplicationRecord()">
            <img src="../../assets/images/greenFinance/right.png">
          </div>
        </div>

      </footer>
       <!--<div style="position: fixed;bottom: 1rem;right: 0.1rem;width: 0.6rem;height: 0.6rem;" @click="toLink()">-->
         <!--<img src="../../assets/images/greenFinance/31.png" style="width: 100%;">-->
       <!--</div>-->

    </div>
</template>

<script>
    export default {
        name: "businessCircles",
      data() {
        return {



        }
      },
      mounted() {


      },
      methods: {
        //返回
        onClickLeft() {
          let u = navigator.userAgent;
          let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //android终端
          let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
          let params={

          };
          if (isAndroid) {
            console.warn('finish');
          } else if (isiOS) {
            window.webkit.messageHandlers.onClickLeftYuansheng.postMessage(params);
          }

        },
        toRegistration(){
          var token = this.$cookies.get("token")||localStorage.getItem('token');
          let u = navigator.userAgent;
          let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //android终端
          let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
          if(!token){
            if (isAndroid) {
              console.warn('进入工商未登陆',token);
              console.warn("ecologylogin");
            } else if (isiOS) {
              window.webkit.messageHandlers.goBackLogin.postMessage(null);
            }
          }else {
            console.warn('进入工商',token);
            this.$router.push({path: '/applicationRegistration'})
          }
        },
        toApplicationRecord(){
          this.$router.push({path: '/applicationRecord'})
        },
        async toLink(){
          const res = await this.$axios.post(this.$api.businessCirclesData);
          if (res.data) {
            this.$router.push({path: '/businessProcess'})
          } else {
            this.$toast(res.msg);
          }
        }
      }
    }
</script>

<style scoped>
.businessCircles{width: 100%;}
  section{margin-top: 0.46rem;}
  .section_head{width: 100%;}
  .section_head img{width: 100%;}
  footer{width: 100%;position: fixed;bottom: 0;background-color: #fff;padding-bottom: 0.1rem;}
  .foot{overflow: hidden;width: 90%;margin: 0 auto;}
.footer_left{width: 50%;position: relative;right: -0.07rem;float: left}
.footer_left img{width: 100%;height: 0.54rem}
.footer_right{width: 50%;position: relative;left:-0.08rem;float: left}
.footer_right img{width: 100%;height:0.54rem}

</style>
